//
// Created by 吴喆 on 2020/3/26.
//

#ifndef SUMMER_DEMOMONSTER_H
#define SUMMER_DEMOMONSTER_H


#include "../engine/NPC.h"
#include "automation/DemoMonsterStateMachine.h"

class DemoMonster : public NPC {
public:
    explicit DemoMonster(const Scene *scene, DIRECTION direction = DIRECTION::LEFT);

    void render() override;

    void beAtked(float val);

    void init() final;

protected:
    void initNPCStateMachine() final;
    void initGameObject() final;
    void initSensorField() final;
private:
    bool isAtked = false;
    float AtkedStateInterval = 0.1f;

    // current interval
    float interval = 0;
};


#endif //SUMMER_DEMOMONSTER_H
